The present invention relates to an image processing apparatus, an image processing method, and a computer program product by which smoothing processing is performed for input image data.
In a known image processing apparatus, to prevent moire from being generated in an image showing dots, average values of each of lightness data R (red), G (green), and B (blue) of a target pixel and pixels in the periphery of the target pixel are computed, and the lightness data R, G, and B of the target pixel are replaced with the corresponding computed average values to thereby execute smoothing processing upon the image. In another known image processing apparatus, weighted average values of each of the lightness data R, G, and B of the target pixel and the pixels on the periphery thereof are computed, and the lightness data of the target pixel are replaced with the computed average values.
However the conventional image processing apparatuses have the following problem: If an input image has a black character drawn in a region of color dots, a black character portion of the target pixel is replaced with an average value of the black character and color dots around the black character. Thus as a result of the execution of the smoothing processing, the black mixes with the colors of the color dots around the black character. Consequently the black character is blurred and the visibility of the black character deteriorates. In addition to this problem caused by dots, the conventional image-processing apparatuses have a problem in executing the smoothing processing upon for an image such as a photographic image in which importance is given to gradation. The problem is that when peripheral pixels in the periphery of the target pixel are much different in their tone from that of the target pixel, the tone of the target pixel is changed by the influence of the tone of the peripheral pixels.